package com.itheima.service.impl;

import com.itheima.domain.Trip;
import com.itheima.mapper.TripMapper;
import com.itheima.service.TripService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class TripServiceImpl implements TripService {
    @Autowired
    private TripMapper tripMapper;
    @Override
    public List<Trip> selectAll() {
        return tripMapper.selectAll();
    }

    @Override
    public int add(Trip trip) {
        return tripMapper.add(trip);
    }

    @Override
    public Trip select(Integer id) {
        return tripMapper.select(id);
    }

    @Override
    public int update(Trip trip) {
        return tripMapper.update(trip);
    }

    @Override
    public int delete(Integer id) {
        return tripMapper.delete(id);
    }
}
